package com.baiku.sanhos.mapper;

import com.baiku.sanhos.pojo.entity.OpenDrug;
import com.baiku.sanhos.pojo.entity.Recipe;
import com.baiku.sanhos.pojo.vo.RecipeVo;
import com.baiku.sanhos.pojo.vo.UserInventoryVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;

@Repository
public interface RecipeMapper extends BaseMapper<Recipe> {
    void addRecipe(RecipeVo recipeVo);

    int getAdminTotalBooking(String nickName);

    List<RecipeVo> selectAdminAll(int pageSize, int offset, String nickName);

    int getTotalBooking(String nickName, String doctorNo);

    List<RecipeVo> selectAll(int pageSize, int offset, String nickName, String doctorNo);

    RecipeVo selectRecipeById(Integer id,String doctorNo);

    void updateByIdStatus(Integer id);

    RecipeVo queryById(int recipeId);

    int getTotalOpenDrug(int recipeId, Date schedulTime,String nickName);

    List<OpenDrug> selectOpenAll(int pageSize, int offset, int recipeId, Date schedulTime, String nickName);

    RecipeVo selectByIdFindTime(Integer recipeId);

    void uodateByIdMoney(Integer recipeId, double money);

    RecipeVo selectByIdFindTotalMoney(Integer id);

    /**
     * 获取用户的项目清单 待打印
     * @param recordId 诊断编号
     * @return 项目清单
     */

    UserInventoryVO userInventory(Integer recordId);
    /**
     * 获取用户的项目清单集合
     * @param username 用户账号
     * @return 项目清单
     * 前端查询
     */
    List<UserInventoryVO> listUserInventory(String username);

    RecipeVo queryByIdFindrecordId(Integer id);

    /**
     * 管理员删除已交费的处方信息
     * @param id
     */

    void deleteAdminRecipeById(Integer id);
}
